package com.example.gongj;

import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @program: gjdemo
 * @description:追加写
 * @author: gongj
 * @Description: TODO
 * @create: 2020-08-16 20:10
 **/
public class FileOutputStreamAppendDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("IO流//b.txt",true);
        fos.write("你好呀".getBytes());
        /**
         * 换行：
         * windows:\r\n
         * Linux:/n
         * max:/r
         */
        fos.write("\r\n".getBytes());
        fos.close();
    }
}
